package it.tukano.treditor.engine.geom;

public class NTriangle {
    
    private final NTuple3 
            v0, v1, v2, //vertices
            n0, n1, n2; //normals
    private final NTuple2
            t0, t1, t2; //tex coords

    public NTriangle(NTuple3 v0, NTuple3 v1, NTuple3 v2, NTuple3 n0, NTuple3 n1, NTuple3 n2, NTuple2 t0, NTuple2 t1, NTuple2 t2) {
        this.v0 = v0;
        this.v1 = v1;
        this.v2 = v2;
        this.n0 = n0;
        this.n1 = n1;
        this.n2 = n2;
        this.t0 = t0;
        this.t1 = t1;
        this.t2 = t2;
    }
    
    public boolean hasNormals() {
        return n0 != null && n1 != null && n2 != null;
    }
    
    public boolean hasCoords() {
        return v0 != null && v1 != null && v2 != null;
    }
    
    public boolean hasTexCoords() {
        return t0 != null && t1 != null && t2 != null;
    }

    public NTuple3 getN0() {
        return n0;
    }

    public NTuple3 getN1() {
        return n1;
    }

    public NTuple3 getN2() {
        return n2;
    }

    public NTuple2 getT0() {
        return t0;
    }

    public NTuple2 getT1() {
        return t1;
    }

    public NTuple2 getT2() {
        return t2;
    }

    public NTuple3 getV0() {
        return v0;
    }

    public NTuple3 getV1() {
        return v1;
    }

    public NTuple3 getV2() {
        return v2;
    }
}
